package point

import (
	"os/exec"
	"strings"
)

type CpuArchPoint struct{}

func NewCpuArchPoint() *CpuArchPoint { return &CpuArchPoint{} }

func (m *CpuArchPoint) Get() any {
	getCpuArch := func() string {
		output, err := exec.Command("arch").Output()
		if err != nil {
			return ""
		}

		return strings.TrimSuffix(string(output), "\n")
	}

	return getCpuArch()
}

func (m *CpuArchPoint) Set(...any) bool { return false }

func (m *CpuArchPoint) SetRoute(string) PointInterface { return m }
